package com.jt.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jt.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

//@Mapper    //将接口交给Spring管理，可以在主启动类里用@MapperScan注解来替换所有Dao接口里的这个@Mapper注解
public interface UserDao extends BaseMapper<User> {
    @Select("select * from user")
    List<User> findAll();
    @Update("update user set age=5500 where name= '黑熊精'")
    int updateUser();
}
